#!/usr/bin/env python
app_name = 'django-concurrency'
app_dir = 'concurrency'
author = 'sax'
version = __import__(app_dir).version
#
import ez_setup, os
ez_setup.use_setuptools()
from setuptools import setup


root_dir = os.path.dirname(__file__)

if root_dir != '':
    os.chdir(root_dir)


def fullsplit(path, result=None):
    """
    Split a pathname into components (the opposite of os.path.join) in a
    platform-neutral way.
    """
    if result is None:
        result = []
    head, tail = os.path.split(path)
    if head == '':
        return [tail] + result
    if head == path:
        return result
    return fullsplit(head, [tail] + result)

packages, data_files = [], []

for dirpath, dirnames, filenames in os.walk(app_dir):
    # Ignore dirnames that start with '.'
    for i, dirname in enumerate(dirnames):
        if dirname.startswith('.'): del dirnames[i]
    if '__init__.py' in filenames:
        packages.append('.'.join(fullsplit(dirpath)))
    elif filenames:
        data_files.append([dirpath, [os.path.join(dirpath, f) for f in filenames]])


        
setup(
    name = app_name,
    version = version,
    install_requires = ['python-dateutil==1.4.1'],
    dependency_links =[], 
    packages = packages,
#    cmdclass = cmdclasses,
    data_files = data_files,

    author = author,
    author_email = "saxix.rome@gmail.com",
    description = "Django cuncurrent model",
    long_description = \
"""

""",
    license = "MIT License",
    keywords = "django c",
    classifiers = [
#        'Development Status :: 5 - Production/Stable',
        'Development Status :: 4 - Beta',
        'Environment :: Web Environment',
        'Framework :: Django',
        'Intended Audience :: Developers',
        'License :: OSI Approved :: MIT License',
        'Operating System :: OS Independent',
        'Programming Language :: Python',
        'Topic :: Utilities',
#        'Topic :: Software Development :: Libraries :: Application Frameworks',
#        'Topic :: Software Development :: Libraries :: Python Modules',
    ],
    platforms = ['any'],
    url = "http://code.google.com/p/%s/" % app_name,
    download_url = "http://code.google.com/p/%s/downloads/list" % app_name,
)
